Run opentrons_simulate inside tempdir and use temp-copied inputs #32
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
osimport.Description
run_opentrons_script_with_json_to_zipcopy the script and JSON into the temporary directory and callsubprocess.runwith the temp paths andcwd=tmpdirusing[ "opentrons_simulate", str(tmp_script), str(tmp_json) ], so the simulator runs inside the temp folder.tmpdir / "build_log.txt"usingPathAPIs instead ofos.path.import osfromsrc/buildcompiler/robotutils.py.Testing
python -m pytest, which exercised the test suite but completed with failures unrelated to this change: 4 failing tests and 3 errors caused by external network/proxy errors whensbol2attempted validation against remote endpoints (e.g.validator.sbolstandard.org).ruff check ., which reported many pre-existing lint issues across notebooks and other files; the change removed a single unused import but the overall lint run did not pass.Codex Task